function ajax(url) {
    fetch(url).then(data => data.json()).then(data => dataGen.next(data))
}
function* steps() {
    console.log('fetching beers');
    const beers = yield ajax('http://api.react.beer/v2/search?q=hops&type=beer');
    console.log(beers);

    console.log('feching wes');
    const wes = yield ajax('http://api.github.com/users/wesbos');
    console.log(wes);

    console.log('fetching fat joe');
    const fatJoe = yield ajax('https://api.discogs.com/artistes/51980');
    console.log(fatJoe);
}

const dataGen = step()
dataGen.next()